/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { FileSet, IgnoreSuperIncremental, TaskDetails, TaskInputValue } from '@ohos/hvigor';

import { TargetTaskService } from '../service/target-task-service.js';

import { AbstractProcessResource } from './abstract-process-resource.js';

/**
 * 编译前的资源处理和生成Restool增量方式编译、链接命令参数的公共抽象类
 *
 * @since 2022/09/22
 */
export abstract class AbstractProcessResourceIncrement extends AbstractProcessResource {
  protected restCommandContent: string | undefined;

  protected constructor(taskService: TargetTaskService, taskDetails: TaskDetails) {
    super(taskService, taskDetails);
  }

  protected doTaskAction(): void {
    // do nothing
    // 一个任务啥都不做不需要增量执行也不需要定义输入输出
  }

  @IgnoreSuperIncremental()
  declareInputs(): Map<string, TaskInputValue> {
    return new Map<string, TaskInputValue>();
  }

  @IgnoreSuperIncremental()
  declareInputFiles(): FileSet {
    return new FileSet();
  }

  @IgnoreSuperIncremental()
  declareOutputFiles(): FileSet {
    return new FileSet();
  }
}
